package www.sofn.com.order.domain.pojo;

import com.baomidou.mybatisplus.annotation.FieldStrategy;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler;
import lombok.Data;
import lombok.experimental.Accessors;
import www.sofn.com.domain.pojo.BasePO;

import java.math.BigDecimal;
import java.time.LocalDateTime;

@Data
@Accessors(chain = true)
@TableName(value = "goods_order",autoResultMap = true)
public class GoodsOrderPO extends BasePO {
    private String goodsName;//商品名称
    private BigDecimal goodsTotalPrice;//商品总价
    private BigDecimal unitPrice;//单价
    private Integer goodsNum;//商品数量
    @TableField(updateStrategy = FieldStrategy.NEVER)
    private LocalDateTime createDate;
    private  Long goodsId; //商品Id
    private String defaultGoodsImg; //默认商品图片
    private Long memberId;//会员Id
    @TableField(typeHandler = JacksonTypeHandler.class)
    private AddressInfo addressInfo;//获取信息
    private Long goodsAttrId;//商品规格id;
    private String goodsAttrName;//商品规格名称

    @Data
    @Accessors(chain = true)
    public static   class  AddressInfo{
        private String recipient;//收件人
        private String phone;//电话
        private String address;//详细地址

    }



}
